package common.response;

/**
 * @title
 * @description
 * @usage
 * @copyright Copyright 2014  rrmj Corporation. All rights reserved.
 * @company 上海众多美网络科技有限公司
 * @author weseal
 * @create 2018/3/30
 */
public class CommonResult<T> {
	private T data;
	private String code;
	private String message;

	public CommonResult(){

	}

	public CommonResult(T data, String code, String message) {
		this.data = data;
		this.code = code;
		this.message = message;
	}

	public CommonResult(T data, String code) {
		this(data,code,null);
	}

	public CommonResult(String code) {
		this(null,code,null);
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public static CommonResult installSuccess(){
		CommonResult commonResult = new CommonResult("200");
		return commonResult;
	}
}
